﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>意见反馈</title>
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="keywords" content="销冠,TopSales微信" />
    <meta name="description" content="销冠,TopSales微信,TopSales销冠" />
    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <base href="http://static.tops001.com/pointstore/" />
    <link href="css/global.css" rel="stylesheet" type="text/css" />
    <link href="css/set.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="js/jquery-form.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>
    <script src="../kk.js"></script>
</head>
<body>
    <form>
        <div class="back_tip" >反馈内容</div>
        <textarea id="comment" class="txt_tip" placeholder="给我们一些建议，我们会更加努力..."></textarea>
        <!--<div class="back_tip">联系方式</div>
        <input id="connectWay" type="text" value="" class="inp_tip" placeholder="QQ/手机号/邮箱"/>-->
        <input type="button" class="sum_tip" value="提交" onclick="f_SubmitSave()"/>
    </form>
    <!--<div class="sub_suc">提交反馈</div>-->
    <script type="text/javascript">
        var apiUrl = "http://"+window.location.host+"/";
        var brokerKid = GetUrlParam("brokerKid");
        function f_SubmitSave() {
            //$("form").submit(function (e) {
                var comment = $.trim($("#comment").val());
                if (comment.length < 1) {
                    $("body").append($("<div class='sub_suc'style='font-size:14px;'>请填写内容!</div>"));
                    loop();
                    $("#comment").focus();
                    //kk.alert("反馈内容不能为空！");
                    return false;
                    //alert(res.msg);
                }
                kk.api.get(apiUrl+'/BrokerApp/Profile/AddFeedbackInfo', { typeKid: 1, comment: comment, brokerKid: brokerKid}, function (res) {
                    if (res.Data = true) {
                        $("body").append($("<div class='sub_suc'>提交成功</div>"));
                        loop();
                        setTimeout(function () { location.href = ""+apiUrl+"feedback.html?brokerKid=" + brokerKid }, 1000);
                    }
                    //alert(res.msg);
                });
           // });
        }
        var loop = function () {
            $(".sub_suc").addClass("opr-fade").animate({ opacity: ".9" }, 500);
            setTimeout(function () {
                $(".sub_suc").animate({ opacity: "0" }, 500);
            }, 1500);
            setTimeout(function () {
                $(".sub_suc").remove();
            }, 2000);
        }

    </script>

</body>
</html>
